package classLoading.classLoader;

import classes.classloader.MyClassLoader;
import com.sun.codemodel.internal.writer.ZipCodeWriter;

public class Demo1 {
    public static void main(String[] args) throws ClassNotFoundException {
        System.out.println("demo classloader -> " + Demo1.class.getClassLoader());
        System.out.println("demo classloader.parent -> " + Demo1.class.getClassLoader().getParent());
        System.out.println("demo classloader.parent.parent -> " + Demo1.class.getClassLoader().getParent().getParent());
        System.out.println(String.class.getClassLoader());
        System.out.println(ZipCodeWriter.class.getClassLoader());

        MyClassLoader myClassLoader = new MyClassLoader();
        System.out.println("myClassLoader -> " + myClassLoader);
        System.out.println("myClassLoader.parent -> " + myClassLoader.getParent());
        System.out.println("myClassLoader.parent.parent -> " + myClassLoader.getParent().getParent());
        System.out.println("myClassLoader.parent.parent.parent -> " + myClassLoader.getParent().getParent().getParent());
    }
}
